Add patch to avoid Flatpak test failures
authorSimon McVittie <smcv@debian.org>
Fri, 22 Jun 2018 00:12:17 +0000 (01:12 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 22 Jun 2018 00:12:19 +0000 (01:12 +0100)
Without this, we get test failures with this ostree if Avahi (or
dbus-daemon --system) is not available on the build/test system.

debian/changelog
debian/patches/avahi-Fail-immediately-if-we-can-t-talk-to-D-Bus-or-Avahi.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]

index 16c460d7db8879d52709c0d05aa6a58cdad605a0..4595ef4a7baf6d06fd9c2bc2627b9f4c9389d535 100644 (file)
@@ -6,6 +6,9 @@ ostree (2018.6-1) UNRELEASED; urgency=medium
     - d/libostree-1-1.symbols: Update
     - Build-depend on Avahi libraries
   * d/rules: Explicitly enable various desired libraries
+  * d/p/avahi-Fail-immediately-if-we-can-t-talk-to-D-Bus-or-Avahi.patch:
+    Add patch to avoid Flatpak test failures with this ostree if Avahi
+    (or dbus-daemon --system) is not available on the build/test system
 
  -- Simon McVittie <smcv@debian.org>  Fri, 08 Jun 2018 09:10:21 +0100
 
diff --git a/debian/patches/avahi-Fail-immediately-if-we-can-t-talk-to-D-Bus-or-Avahi.patch b/debian/patches/avahi-Fail-immediately-if-we-can-t-talk-to-D-Bus-or-Avahi.patch
new file mode 100644 (file)
index 0000000..630ec7c
--- /dev/null
@@ -0,0 +1,29 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 22 Jun 2018 01:10:55 +0100
+Subject: avahi: Fail immediately if we can't talk to D-Bus or Avahi
+
+We special-case AVAHI_ERR_NO_DAEMON to not cause warnings, but if
+we pass AVAHI_CLIENT_NO_FAIL to avahi_client_new, we never actually
+see AVAHI_ERR_NO_DAEMON. Instead, we will get AVAHI_ERR_BAD_STATE
+when we try to use the client.
+
+Bug: https://github.com/ostreedev/ostree/issues/1618
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ src/libostree/ostree-repo-finder-avahi.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/libostree/ostree-repo-finder-avahi.c b/src/libostree/ostree-repo-finder-avahi.c
+index 223d8f0..bc38376 100644
+--- a/src/libostree/ostree-repo-finder-avahi.c
++++ b/src/libostree/ostree-repo-finder-avahi.c
+@@ -1432,8 +1432,7 @@ ostree_repo_finder_avahi_start (OstreeRepoFinderAvahi  *self,
+   g_assert (self->client == NULL);
+-  client = avahi_client_new (avahi_glib_poll_get (self->poll),
+-                             AVAHI_CLIENT_NO_FAIL,
++  client = avahi_client_new (avahi_glib_poll_get (self->poll), 0,
+                              client_cb, self, &failure);
+   if (client == NULL)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..264a601
--- /dev/null
@@ -0,0 +1 @@
+avahi-Fail-immediately-if-we-can-t-talk-to-D-Bus-or-Avahi.patch